package com.bigben.mapper;

import com.bigben.entites.CommDictionaryDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CommDictionaryDetailMapper {

    @Select("SELECT * FROM comm_dictionary_detail WHERE parentCode = #{parentCode}")
    @ResultMap("com.bigben.mapper.CommDictionaryDetailMapper.BaseResultMap")
    List<CommDictionaryDetail> getDictByParentCode(@Param("parentCode") String parentCode);

    @Select("SELECT * FROM comm_dictionary_detail")
    @ResultMap("com.bigben.mapper.CommDictionaryDetailMapper.BaseResultMap")
    List<CommDictionaryDetail> getAll();
}